package com.exm.sql.util;

import java.util.Date;
import java.util.concurrent.TimeUnit;

public class DateUtil {

    public static long calculateDaysBetween(Date startDate, Date endDate) {
        // 将两个日期的时间差（毫秒）转换为天数
        long diffInMillies = endDate.getTime() - startDate.getTime();
        return TimeUnit.MILLISECONDS.toDays(diffInMillies);
    }

}
